This file contains instructions for running the GeoRaster tools, which are the 
loader, exporter and viewer. These tools are stand-alone client-side java 
executables. You need to use the proper JVM and set up the jar files before 
you run these tools.

##############################################
#                                            #
# 1. Prepare for running the GeoRaster tools #
#                                            #
##############################################


Before you begin, please make sure that you are using Java Virtual Machine 
version 1.6 or higher.

If you just want to run the GeoRasterViewer, you can find startGeoRasterViewer.sh 
and startGeoRasterViewer.bat in the following directory:
 ${ORACLE_HOME}/md/demo/georaster/java
These two script files can automatically setup the classpath and run the viewer on 
unix and windows platforms respectively.

I. 

First, make sure that the CLASSPATH contains a path to these libraries:
ojdbc6.jar
jai_codec.jar
jai_core.jar
xdb.jar
xmlcomp.jar
xmlparserv2.jar
xschema.jar
jewt4.jar 
sdoapi.jar
sdoutl.jar
nls_charset12.jar (see note on character sets below)

These libraries are standard in the Oracle environment, and can be found at:

${ORACLE_HOME}/ord/jlib/jai_codec.jar
${ORACLE_HOME}/ord/jlib/jai_core.jar
${ORACLE_HOME}/jdbc/lib/ojdbc6.jar
${ORACLE_HOME}/rdbms/jlib/xdb.jar
${ORACLE_HOME}/lib/xmlparserv2.jar
${ORACLE_HOME}/lib/xmlcomp.jar
${ORACLE_HOME}/lib/xschema.jar
${ORACLE_HOME}/jlib/jewt4.jar
${ORACLE_HOME}/md/jlib/sdoapi.jar
${ORACLE_HOME}/md/jlib/sdoutl.jar
${ORACLE_HOME}/dbjava/lib/nls_charset12.jar

where ${ORACLE_HOME} specifies the complete path to the top-level directory 
that holds the Oracle environment.

To load or export GeoTIFF images, add:

xtiff-jai.jar (available from the SourceForge Extensible-TIFF-JAI group)
geotiff-jai.jar (available from the SourceForge GeoTIFF-JAI group)

To load or export JP2 images, add:

jai-imageio.jar (available from the Sun Java(TM) Advanced Imaging Image I/O Tools download page).


***************************
* Note on character sets: *
***************************
If you are working with an international non-English character set, then you may need to add the nls_charset12.jar file to your classpath. Error messages that signal the need for nls_charset12.jar are:
* Exception in thread "main" java.lang.NoClassDefFoundError: oracle/gss/util/NLSError
* java.sql.SQLException: Missing IN or OUT parameter at index:: 8

II. 

Next, add the client library to your CLASSPATH. The client library is called 
georaster_tools.jar, and it should be located in the same directory as this 
README file. The location is:

  ${ORACLE_HOME}/md/demo/georaster/java/georaster_tools.jar


*******************************************
* Setting the CLASSPATH: a Brief Tutorial *
*******************************************

The procedure for setting the CLASSPATH depends on the operating system.  On a
Unix/Linux platform, the syntax is of the form

(e.g.)
setenv CLASSPATH .:/path1:/path2:/path3

where the period (.) means "current directory", the initial forward-slash (/) 
means "root directory", and therefore path1, path2, and path3 specify the 
complete directory path to the directory that contains the desired *.class 
files. 

JAR files, such as those required for the GeoRaster tool, are considered to be
a type of directory, because they hold a group of *.class files. Thus, when 
adding a jar file to the CLASSPATH, the actual file name must be included in 
the path:

(e.g.)
setenv CLASSPATH .:/path1/jarfile1.jar:/path2/jarfile2.jar

The syntax for setting the CLASSPATH listed in this tutorial so far will 
*overwrite* any previous CLASSPATH settings. If you wish to simply *add* new 
paths to the CLASSPATH, the syntax is as follows:

(e.g.)
setenv CLASSPATH ${CLASSPATH}:/path1/jarfile1.jar:/path2:/path3
     
The CLASSPATH can be set on a per-session basis from the command line (i.e., 
at the prompt), or more persistently using an environment setup script such 
as .cshrc, .environment, and/or .login. Please refer to a UNIX environment 
reference for more information. 

In summary, let us consider the CLASSPATH settings required for the GeoRaster 
client:

setenv CLASSPATH .:${ORACLE_HOME}/ord/jlib/jai_codec.jar:${ORACLE_HOME}/ord/jlib/jai_core.jar:${ORACLE_HOME}/jdbc/lib/ojdbc6.jar:${ORACLE_HOME}/rdbms/jlib/xdb.jar:${ORACLE_HOME}/lib/xmlparserv2.jar:${ORACLE_HOME}/lib/xmlcomp.jar:${ORACLE_HOME}/lib/xschema.jar:${ORACLE_HOME}/jlib/jewt4.jar:${ORACLE_HOME}/md/jlib/sdoapi.jar:${ORACLE_HOME}/md/jlib/sdoutl.jar:${ORACLE_HOME}/md/demo/georaster/java/georaster_tools.jar

Or, if you wish to preserve your existing CLASSPATH settings:

setenv CLASSPATH ${CLASSPATH}:${ORACLE_HOME}/ord/jlib/jai_codec.jar:${ORACLE_HOME}/ord/jlib/jai_core.jar:${ORACLE_HOME}/jdbc/lib/ojdbc6.jar:${ORACLE_HOME}/rdbms/jlib/xdb.jar:${ORACLE_HOME}/lib/xmlparserv2.jar:${ORACLE_HOME}/lib/xmlcomp.jar:${ORACLE_HOME}/lib/xschema.jar:${ORACLE_HOME}/jlib/jewt4.jar:${ORACLE_HOME}/md/jlib/sdoapi.jar:${ORACLE_HOME}/md/jlib/sdoutl.jar:${ORACLE_HOME}/md/demo/georaster/java/georaster_tools.jar

On Windows NT, one way to set the CLASSPATH is to go to 
Settings->Control Panel->System->Environment, and then specify CLASSPATH as 
the "Variable" and the desired path list as the "Value". Finally, click 
"Apply", and the CLASSPATH is reset to the new value. Another way is to use 
the "set" utility at the DOS prompt.

III. 

Run the client. The client library georaster_tools.jar defines three 
individual clients: GeoRasterLoader, GeoRasterExporter, and GeoRasterViewer. 
Instructions for running each of them is as follows.


##############################################
#                                            #
# 2. Run the GeoRasterLoader                 #
#                                            #
##############################################

The GeoRasterLoader takes an image file (and an optional world file and SRID, 
if specified) and loads it into the database as a GeoRaster object. You can 
currently choose only from among the following image formats: "TIFF", "GEOTIFF", "JPEG", "JP2",
"GIF", "BMP", and "PNG". The world file must be in ESRI format. The JP2 file format is supported 
only if jai-imageio.jar is present in the CLASSPATH. 

*****************************************************************
*Before running the Loader, you must first prepare the database:*
*****************************************************************

1. Create a table that contains at least a column of type MDSYS.SDO_GEORASTER

(e.g.) 

SQL> create table images (image mdsys.sdo_georaster);

2. Create one or more tables of type MDSYS.SDO_RASTER, with primary key 
constraints enforced on the five attributes of MDSYS.SDO_RASTER. These tables 
are called "raster data tables", or RDT's for short. 

(e.g.)

SQL> create table rdt1 of mdsys.sdo_raster (primary key (rasterId, pyramidLevel, bandBlockNumber, rowBlockNumber, columnBlockNumber));  

3. Insert "initial" entries into the table from part (1), corresponding to 
each image that you plan to load. You must specify the name of the RDT (and 
optionally, the desired rasterid) in which you wish to store the georaster 
object, as shown in the example below. 

(e.g.)

SQL> INSERT INTO images VALUES(MDSYS.SDO_GEOR.init('rdt1'));

or 

SQL> INSERT INTO images VALUES(MDSYS.SDO_GEOR.init('rdt1', 1));

MDSYS.SDO_GEOR.init('rdtName') creates a new MDSYS.SDO_GEORASTER object, with 
two parameters set: the RDT = rdtName, and the rasterid.  If the rasterid is 
not specified, the Oracle environment chooses the rasterid automatically, such
 that each georaster object gets a rasterid that is unique within its RDT. In 
other words, the (rasterid, rdtName) pair uniquely identifies a georaster 
object in the database. 

4. Query the database to discover the rasterid assigned to the initial entry 
that you have created in (3). This step only applies if you used the 
SDO_GEORASTER.init('rdtName') function to initialize the georaster object.

(e.g.)

SQL> select image from images;

This command would return data of the form:

(e.g.)

IMAGE(RASTERTYPE, SPATIALEXTENT(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELE
--------------------------------------------------------------------------------
SDO_GEORASTER(NULL, NULL, 'RDT1', 154, NULL) 

From here we discover that the rasterid that Oracle happens to assign to our 
example entry is 154.

NOTE, before you can load an image into the initialized GeoRaster object, 
please follow step 3 to make sure that the RDT table in which you want the 
image to be stored actually exists.

*****************************************
*NOW, THE DATABASE IS READY FOR LOADING.*
*****************************************

To run GeoRasterLoader, use the following command line invocation 
format:
 
java oracle.spatial.georaster.tools.GeoRasterLoader "hostname" "instanceName" "portNum" "dbuser" "dbpassword" "clienttype" "rowPref" "trueIfClientSide" "imageTableName" "georColName" "storageParams" "pathToImageFile1,rasterid1,rdtName1[,worldFileName1[,SRID1]]" "pathToImageFile2,rasterid2,rdtName2[,worldFileName2[,SRID2]]" ... "pathToImageFileN,rasteridN,rdtNameN[,worldFileNameN[,SRIDN]"

The parameters for ImageFile2 through ImageFileN are optional, used if you 
want to make just one database connection to load several georaster objects. 

To load multiple images from a single JP2 codestream, the rasterid and rdtName parameters should be extended as semicolon-delimited lists of equal length, as follows:

"pathToImageFile1,rasterid1_a;rasterid1_b;...rasterid1_x,rdtName1_a;rdtName1_b;...rdtName1_x[,worldFileName1[,SRID1]]

In the above example, rasterid1 is extended to be "rasterid1_a;rasterid1_b;...rasterid1_x" and rdtName1 is extended to be "rdtName1_a;rdtName1_b...rasterid1_x". A unique rasterid/rdtName pair should be assigned to each image.

Definition of parameters:
"hostname"         = name of the host machine where the database runs.
"instanceName"     = instance id of the database
"portNum"          = which port the database is listening at
"dbuser"           = the database user in which the images will be stored
"dbpassword"       = the password corresponding to "dbuser"
"clienttype"       = possible values are "thin", "oci" or "oci8"   
"rowPref"          = the row prefetch to be set with the connection. If a value
                     less than or equal to zero is supplied, the default value
                     of 32 will be used for this connection.
"trueIfClientSide" = Always "T" when running tool from client side.
"imageTableName"   = the name of the table that you want to hold your 
		     georaster object(s).
"georColName"      = the name of the column in table "imageTableName" that 
                     holds objects of type MDSYS.SDO_GEORASTER
"storageParams"	   = specify any of the the following parameters as needed, and separate each 
		     key=value pair by a comma:
		     (e.g. "key1=value1,key2=value2"): 
		             
	blocking=?? (true or false, default is false),
		If blocking=false, then the image is loaded as a single block. If blocking=true, 
		then the image is loaded as one or more blocks, depending on the values specified 
		in the blockSize parameter.

	blockSize=(h,w) or (h,w,b)
		If blocking=true, and no blockSize parameter is specified, then default size for 
                height and width is 256; for bands, the default is the total number of bands. 
		If neither blocking nor blocksize parameters are specified, then the three 
		dimensions are defined by the original image. 
                The loaded GeoRaster object has the BIP interleaving type only.

	compression=?? (JPEG-F, or DEFLATE)
		Input raster data can be specified to be compressed during the loading operation 
		by using the compression=?? storage parameter. The available compression types 
		are JPEG-F, the full Baseline JPEG format, and DEFLATE. Please refer to chapter 
                1.8 of the Oracle Spatial GeoRaster Reference for more information about 
                compression options and constraints on the raster data formats that are 
                compatible with these compression formats.  (See also, Example 5, below.)	
	
	quality=?? (Integer between 0 and 100, default is 75) 
		Relevant only when compression=JPEG-F.
 
	spatialExtent=?? (true or false, default is false)
		The spatialExtent storage parameter allows the user to specify whether or not the 
		spatial extent should be automatically generated during the loading process. This 
		parameter is relevant only when a nonzero SRID is specified. If no SRID is 
		specified, or if SRID = 0, then the spatial extent is set to null, even if 
		spatialExtent=true. If spatialExtent=false, which is the default value, the 
		spatial extent is set to null. Example 4 demonstrates this usage.

	geotiff=?? (true or false, default is false) Requires xtiff-jai.jar, geotiff-jai.jar.
		If geotiff=true and the required jarfiles are present in the classpath, then, 
		if the image is GeoTIFF format, the GeoTIFF data will be loaded into the 
		GeoRaster SRS metadata as part of this GeoRaster object. 
		Otherwise, the input image will be treated as a regular TIFF image.

	raster=?? (true or false, default is true)
		Specify raster=false along with geotiff=true if you wish to load only 
                georeferencing metadata from a GeoTIFF file into an existing GeoRaster object, 
		without loading the raster image.

	srid=?? (integer, a valid SRID)
                For use with geotiff=true, to specify a backup SRID value in case if it is not 
		found in the Oracle SRS database for the given GeoTIFF georeferencing metadata. 
	              
"pathToImageFile"  = the path at which the image file can be found

"rasterid"         = the rasterid which will correspond to this image file

"rdtName"          = the RDT which will store the raster data for this image.

"worldFileName"    = this is optional, specifies the world file with which to 
                     georeference the georaster object. 

"SRID"             = this is optional, specifies the SRID to be associated with this 
		     georeferenced georaster object. This parameter only applies if a world 
		     file is also specified. For GeoTIFF georeferencing, see instead the storage 
		     parameter "srid=??" above. 

After a georaster object has been loaded, the GeoRasterLoader can also be invoked to georeference the existing georaster object by importing just a world file and SRID. In this case, the pathToImageFile parameter is left blank, while the rasterid, rdtName, worldFileName and SRID are specified. For this operation, the parameter string takes the form: (note the leading comma)

",rasterid,rdtName,worldFileName[,SRID]"

Example 3 below demonstrates this usage. Please note, that the SRID parameter is optional, even when the world file is specified. However, if the SRID is omitted, the resulting georaster object will be invalid with error ORA-13460 due to a zero-valued SRID. In this case, the sdo_geor.setModelSRID() function (or user-defined equivalent, on the client side) would need to be invoked separately to validate the georaster object.


******************************************
* Example invocations of GeoRasterLoader *
******************************************
Assume the following:
-the machine name is "machine1.mycompany.com" 
-the database instance name is "orcl"
-database port number is 1521
-database username/password is scott/tiger 
-a thin oracle client is being used
-the row preference is 32
-table/column to store the GeoRaster object is georaster_table/georaster_column

**************
* Example 1: *  Loading a GeoRaster object with reblocking.
**************

If the raster data to be loaded is located at the complete path /images/parrot.tif and 
should be blocked into 512x512 blocks of 1 band each, the following command line invocation 
of GeoRasterLoader is used:
  
java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "blocking=true,blocksize=(512,512,1)" "/images/parrot.tif,154,rdt1"

**************
* Example 2: *  Loading the raster data as is, without reblocking:
**************

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "" "/images/parrot.tif,154,rdt1"

**************
* Example 3: *  Georeferencing an existing GeoRaster object using a world file.
**************

Here, we georeference the above loaded georaster object, at rasterid = 154 and rdtName = rdt1, using the world file /images/parrot.tfw and SRID = 82394:

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "" ",154,rdt1,/images/parrot.tfw,82394"

**************
* Example 4: *  Having the spatial extent generated automatically during the loading process.
**************

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "spatialExtent=true" "/images/parrot.tif,154,rdt1,/images/parrot.tfw,82394"

Or, if /images/parrot.tif has previously been loaded, as in Example 2, and we wish to just load the worldfile and SRID:

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "spatialExtent=true" ",154,rdt1,/images/parrot.tfw,82394"
 
**************
* Example 5: *  Loading a georaster object with (e.g.) JPEG-F compression.
**************

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "compression=JPEG-F" "/images/parrot.tif,154,rdt1"

**************
* Example 6: *  Loading a GeoTIFF georeferenced GeoRaster object. 
**************

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "geotiff=true" "/images/agtfim.tif,120,rdt1"

**************
* Example 7: *  Loading GeoTIFF georeferencing metadata into an existing GeoRaster object.
**************

Here, we are georeferencing the GeoRaster object at rasterid = 154, rdt = rdt1 (/images/parrot.tif) using the GeoTIFF metadata found in /image/agtfim.tif.

java oracle.spatial.georaster.tools.GeoRasterLoader machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "geotiff=true,raster=false" "/images/agtfim.tif,154,rdt1"


##############################################
#                                            #
# 3. Run the GeoRasterViewer                 #
#                                            #
##############################################


The GeoRasterViewer is a pure java standalone tool that can be used to view 
GeoRaster objects from Oracle GeoRaster database and images in the local file
system. It can also display a virtual mosaic defined as one or a list of GeoRaster
tables or views. Additionally, it provides the following features:

1) displaying cell values of GeoRaster object by a separate panel
2) displaying and configuring layers mapping by a separate panel
3) enabling/disabling block line and setting color of block line
4) supporting the following "view" actions by menu,toolbar or mouse
    Overview
    Zoom in
    Zoom out
    Refresh
5) supporting the following "image" actions by menu or toolbar
    automatic linear stretch
    manual linear stretch
    piecewise linear stretch
    normalize
    equalize
    brightness control
    contrast control
    threshold
6) providing gui interface to allow users to import/export GeoRaster objects 
   into/from Oracle database.
7) supporting box selection on the GeoRaster object in the image panel, and 
   allowing user to export  the selected window to the image file in the local
   file system.

The GeoRasterViewer can be invoked by running the following command:

 java oracle.spatial.georaster.tools.GeoRasterTool


*******
Java TIP: If you get an OutOfMemoryError, you can increase the maximum heap 
size for use by the JVM with the -Xmx[Number] parameter. 

(e.g.)
java -Xmx90000000  oracle.spatial.georaster.tools.GeoRasterTool  

The same applies to any invocation of "java", regardless of the application 
being run.
********

##############################################
#                                            #
# 4. Run the GeoRasterExporter               #
#                                            #
##############################################


The GeoRasterExporter takes a georaster object that has been loaded into the database and 
exports it to a file according to the specified image file format. You can currently choose 
only from among the following formats: 
"TIFF", "GEOTIFF", "JPEG", "BMP", "PNG", "JP2". 

You can export the georeferencing information into a ESRI world file. If xtiff-jai.jar and 
geotiff-jai.jar are present in the CLASSPATH, you also can export a georeferenced GeoRaster 
object to the georeferenced GeoTIFF file format. The JP2 file format is supported only if 
jai-imageio.jar is present in the CLASSPATH. 

java oracle.spatial.georaster.tools.GeoRasterExporter "hostname" "instanceName" "portNum" "dbuser" "dbpassword" "clienttype" "rowPref" "clienttype" "imageTableName" "georColName" "rasterid,rdtName" "exportFormat" "outputFilePath" ["storageParams" "worldFileFormat" "outputWorldFilePath"]

Definition of parameters

"exportFormat"   = the image file format into which to export the image. Your 
                   choice from among "TIFF", "GEOTIFF", "JPEG", "BMP", "PNG", "JP2".
 
"outputFilePath" = the path to the output file that you wish to contain the 
                   exported image. DO NOT SPECIFY THE EXTENSION -- it is 
                   automatically appended by the exporter based on the value 
                   of "exportFormat". 

"storageParams"  = specify any of the following, separate each key=value pair
		   by a comma: (e.g. "key1=value1,key2=value2,key3=value3")
			pLevel: Pyramid level to be exported. The default is 0.
 
	cropArea=(r0,c0,r1,c1) 
		Specify the area to be exported in the format 
		cropArea=(startRow, startCol, endRow,endCol). StartCol is the index of the 
		leftmost pixel to be exported relative to the original image; startRow is
		the index of the top pixel to be exported; endCol is the index of the 
		rightmost pixel to be exported; and endRow is the index of the bottom pixel 
		to be exported. If croparea is not specified, the entire image is exported. 

	layerNumbers=(b0-b1) or layerNumbers=(b0,b1,b2,...) 
		Layer numbers of the layers to be to be exported. For example, 
		layerNumbers=(3-5) exports layers 3, 4, and 5; and layerNumbers=(1,3,5) 
		exports layers 1, 3, and 5.

	ratio=?? (nonnegative float value)
		Relevant only when export format is "JP2". Optional, specifies the desired 
		compression ratio. Default is 1.0.

	colorspace=RGB|MULTI
		Relevant only when export format is "JP2". Specifies the desired
		colorspace option. Optional, default is MULTI.

"worldFileFormat" = should be "WORLDFILE". Optional, used only for world file 
		    export.
				   
"outputWorldFilePath" = the path to the output world file that you wish to 
                        hold the referencing information that is being 
			exported from the georaster object. Optional, used 
			only for world file export. Similarly as for 
                        outputFilePath, do not specify the file extension.

For all other parameters, see definitions in the GeoRasterLoader instructions above.

Note that GeoRasterExporter can be used to export the world file separately, without exporting 
raster data, by leaving the outputFilePath parameter blank while specifying the 
outputWorldFilePath. (see Example 3 below)
 
********************************************
* Example invocations of GeoRasterExporter *
********************************************
Assume the following:
-the machine name is "machine1.mycompany.com"
-the database instance name is "orcl"
-database port number is 1521
-database username/password is scott/tiger 
-a thin oracle client is being used
-the row preference is 32
-table/column storing the GeoRaster object is georaster_table/georaster_column

**************
* Example 1: *  Exporting a single layer of a 100x100 subset of a GeoRaster object
**************

If only the first layer of the top left 100x100 corner of the georaster object at rasterid=154, 
rdt = rdt1 is to be exported in BMP format to the (complete path) file /images/expt/parrot.bmp, 
the following command line invocation of GeoRasterExporter can be used:

java oracle.spatial.georaster.tools.GeoRasterExporter machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "154,rdt1" "BMP" "/images/expt/parrot" "layerNumbers=(1),cropArea=(0,0,99,99)" 

**************
* Example 2: *  Exporting the entire GeoRaster object as is:
**************

java oracle.spatial.georaster.tools.GeoRasterExporter machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "154,rdt1" "BMP" "/images/expt/parrot"

**************
* Example 3: *  Exporting just the world file from a georeferenced GeoRaster object:
**************

java oracle.spatial.georaster.tools.GeoRasterExporter machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "154,rdt1" "BMP" "" "" "WORLDFILE" "/images/expt/parrot_world_file"

**************
* Example 4: * Exporting to GeoTIFF format 
**************

java oracle.spatial.georaster.tools.GeoRasterExporter machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "154,rdt1" "GEOTIFF" "/images/expt/parrot"

**************
* Example 5: * Exporting to JP2 format with colorspace and ratio options specified.
************** 

java oracle.spatial.georaster.tools.GeoRasterExporter machine1.mycompany.com orcl 1521 scott tiger thin 32 T georaster_table georaster_column "154,rdt1" "JP2" "/images/expt/parrot" "colorspace=RGB,ratio=20.0"

########
#      #
# Tips #
#      #
########

* Error messages appear in the command line window (e.g. at the DOS prompt). 
If you experience problems while running GeoRasterViewer, please be sure to 
check the command line window for a possible error message.

Common Errors:

Message: "Cannot get connection."
Explanation: A parameter that specifies the connection may be incorrect. Check 
the hostname, instanceName, portnum, dbuser, and dbpassword parameter values.

Message: "Error: missing parameter."
Explanation: A required parameter is missing from the command line. 

Message: "DB Access Error: One or more of the following was not found: tableName, columnName, tableName.columnName.rasterdatatable"
Explanation: The table name or column name provided as command line parameter 
does not exist, or do not specify an entry with type SDO_GEORASTER.  

Message: java.sql.SQLException: ORA-22922: nonexistent LOB value
Explanation: The specified pyramid level may be out of range.

##########
#        #                             
# Notes  #
#        # 
##########

1. 2-bit images are not supported.

2. BIL and BSQ georaster objects are exported as valid BIP images. 

3. GeoRasterLoader supports only BIP raster data inputs, for example, a TIFF format image with BSQ interleaving can not be loaded by GeoRasterLoader, but the source image can be reformatted by a third-party utility before loading, please check the Oracle Spatial GeoRaster Developer's Guide, Section 3.3.1 for details. 

4. The import operation cannot be rolled back. 

5. Block size (blockWidth*blockHeight*numBandsInBlock) must be <= 2147483647

6. GeoRaster Viewer has the following limitations:

   -Celldepth type 8BIT_S is not supported by the Viewer

   -Celldepth type 32BIT_S is not supported by the Viewer

   -Celldepth type 16BIT_S with colormap or grayScale is not supported by the Viewer

7. GeoRaster objects with celldepth > 8 cannot be exported into JPEG or BMP 
format. 

8. GeoRaster objects with celldepth > 16 cannot be exported into PNG format. 

9. GeoRaster objects with celldepth > 32 cannot be exported into TIFF format. 

10. Celldepth type 32BIT_S is not supported by the exporter. (Note: 32BIT_U and 32BIT_REAL are supported, however.)

11. Maximum amount that can be exported at one time is 65MB. I.e., width*height*numBands*cellDepth/8 = 65MB, where width and height specify the portion of the GeoRaster object to be exported. (e.g. using cropArea)

12. When loading an image from a JPEG file format, the amount of memory required for the operation depends on the size of the uncompressed image, and can be specified as a command line parameter to java using the -Xmx option (e.g. java -Xmx256M oracle.spatial.georaster.tools.GeoRasterLoader ...) Reformatting the source image with a third-party utility can reduce memory requirements. Please check the Oracle Spatial GeoRaster Developer's Guide, Section 3.3.1 for details.  

13. The GeoTIFF PixelIsArea raster space is equivalent to the GeoRaster upperleft-based cell coordinate system. Export to GeoTiff is always in PixelIsArea raster space, with a half-pixel adjustment of the affine transformation if the GeoRaster object is in center-based cell coordinate system. Import from GeoTIFF is always to the GeoRaster center-based cell coordinate system, with a half-pixel adjustment of the affine transformation if the GeoTIFF file is specified in PixelIsArea raster space. 

14. JP2 image restrictions:

- Different component subsampling rates are not supported in the same code stream.

- Images for which width*height*numBands > 2147483647 cells are not supported.

- JP2 multi-image codestreams with > 2147483647 images are not supported. 

- Boxes not defined in part 1 of the standard JPEG2000 "core coding system" are not supported.

- Up to 5 JP2 resolution levels are supported.

- Pseudocolor is not supported for JP2 images: any accompanying colormap will not be loaded into GeoRaster. It may be loaded separately using SDO_GEOR.setColorMap() on the server side. 

- Multi-resolution JP2 images are not supported

- Multi-celldepth JP2 images are not supported

- 64 bit cell depth is not supported, all other GeoRaster cell depths are supported.

- Image size for loading and exporting JP2 is limited by the user's system memory resources allocated for the Java heap. When loading, memory requirements can be reduced by reformatting the source image with a third-party utility. Please check the Oracle Spatial GeoRaster Developer's Guide, Section 3.3.1 for details.  

15.For the empty raster blocks, the viewer uses zero as pixel value, and user can not specify a different value for display.

16.if the following conditions are met, then java loader will load image directly without decompression and comprssion:
   --image file is a JPEG file
   --georaster object's compression type is JPEG-F
   --no blocking specified for georaster object's storage 
  














